using BasecampRestAPI;

namespace TestBasecampRestAPI.Fakes
{
	public class FakeWebRequestFactory : IWebRequestFactory
	{
		public static FakeWebRequestFactory GetInstance()
		{
			return new FakeWebRequestFactory();
		}
		private FakeWebRequestFactory()
		{
		}

		#region Implementation of IWebRequestFactory

		public IWebRequest CreateWebRequest(string url)
		{
			CreateWebRequestLastUrl = url;
			CreateWebRequestCalled = true;
			return CreateWebRequestFakeResult;
		}

		public bool CreateWebRequestCalled { get; private set; }
		public string CreateWebRequestLastUrl { get; private set; }
		public IWebRequest CreateWebRequestFakeResult { private get; set; }

		#endregion
	}
}